package com.eda;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TabHost;

public class PubActivity extends TabActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setTitle("Pub Tab Activity");
		TabHost tabHost = getTabHost();
		
		LayoutInflater.from(this).inflate(R.layout.activity_pub, tabHost.getTabContentView(),true);
		tabHost.addTab(tabHost.newTabSpec("查找车源").setIndicator("查找车源")
				.setContent(R.id.pubFindLayout));
		tabHost.addTab(tabHost.newTabSpec("发布货源").setIndicator("发布货源")
				.setContent(R.id.pubPubLayout));
		tabHost.addTab(tabHost.newTabSpec("我的货源").setIndicator("我的货源")
				.setContent(R.id.pubMycargoLayout));
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.pub, menu);
		return true;
	}
}
